package com.SB;

import lombok.extern.slf4j.Slf4j;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.ApplicationArguments;
import org.springframework.boot.ApplicationRunner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;

/**
 * @author 金园
 * @create 2022/10/14
 * @Description SpringBoot启动类
 * @className ApplicationSB
 * @packageName com.SB
 */
@SuppressWarnings("all")
@SpringBootApplication
@MapperScan("com.SB.**")
@Slf4j
public class ApplicationSB implements ApplicationRunner {
    public static void main(String[] args) {
        try {
            log.info("准备启动SpringBoot项目！......");
            Thread.sleep(1500);
            SpringApplication.run(ApplicationSB.class,args);
            Thread.sleep(1500);
            log.info("启动SpringBoot项目成功！......");
        } catch (Exception e) {
            e.printStackTrace();
            log.error("启动SpringBoot项目失败！......");
            log.error("报错原因 ============== ", e);
        }

    }

    @Override
    public void run(ApplicationArguments args) throws Exception {
        log.info("日志系统启动成功！......");
    }
}
